<template>
  <div class="app-view">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>

    <v-loading v-if="loadingStatus"></v-loading>
  </div>
</template>

<script>
  import {mapGetters} from 'vuex'
  import vLoading from '@/components/loading.vue'
  export default {
    components: {vLoading},
    data () {
      return {

      }
    },
    computed: {
      ...mapGetters(['loadingStatus'])
    },
    mounted(){

    },
    methods: {

    },
    watch: {
      '$route'(to, from) {

        var type = to.meta.type;//(posfixed  对body设置样式)
        if (type == "posfixed") {
          document.getElementById('winbody').style.overflow = "hidden"
        } else {
          document.getElementById('winbody').style.overflow = "visible"
        }

      }
    }
  }
</script>

<style lang="scss">
  @import '@css/reset.scss';
  @import '@css/basecore.min.scss';
</style>
